#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

class Time
{
public:
	Time(int hour)
		:_hour(hour)
	{
		cout << "Time()" << endl;
	}
private:
	int _hour;
};

class Date
{
public:
	Date(int& xx, int year = 1, int month = 1, int day = 1)
		:_year(year)
		, _month(month)
		, _day(day)
		, _n(1)
		, _ref(xx)
		,_t(1)
		,_ptr((int*)malloc(12))
	{
		if (_ptr == nullptr)
		{
			perror("malloc fail:");
		}
		else
		{
			memset(_ptr, 0, 12);
		}
	}

	void Print()
	{
		cout << _year << "-" << _month << "-" << _day << endl;
	}

private:
	int _year = 1;
	int _month = 1;
	int _day = 1;
	int& _ref;
	const int _n;
	int _t;

	int* _ptr;
};

int main()
{
	int x = 0;
	Date d1(x, 2024, 8, 13);
	d1.Print();
	
	Time h(1);

	return 0;
}